package hibernate.roomSystem;

public class Facing {
	private String name;
	private Facing(String n){
		name=n;
	}
	
	private static Facing front=new Facing("FRONT_VIEW");
	private static Facing rear=new Facing("REAR_VIEW");
	private static Facing city=new Facing("CITY_VIEW");
	private static Facing sea=new Facing("SEA_VIEW");
	private static Facing garden=new Facing("GARDEN_VIEW");
	private static Facing lake=new Facing("LAKE_VIEW");
	
	public String toString(){
		return name;
	}
	
	public static Facing getInstantce(String s){
		if(s.equals("FRONT_VIEW"))
			return front;
		else if(s.equals("REAR_VIEW"))
			return rear;
		else if(s.equals("CITY_VIEW"))
			return city;
		else if(s.equals("SEA_VIEW"))
			return sea;
		else if(s.equals("GARDEN_VIEW"))
			return garden;
		else if(s.equals("LAKE_VIEW"))
			return lake;
		else 
			throw new java.lang.IllegalArgumentException("no this facing");
	}

}
